package com.czkevin.cif.events;

import com.czkevin.cif.CIFItemInstance;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

public class CIFBlockChangedEvent extends Event {
    private static final HandlerList handlerList = new HandlerList();

    private final Player player;
    private final CIFBlockEvent.Action action;
    private final Location location;
    private final CIFItemInstance item;

    public CIFBlockChangedEvent(Player player, CIFBlockEvent.Action action, Location location, CIFItemInstance item) {
        this.player = player;
        this.action = action;
        this.location = location;
        this.item = item;
    }

    public Player getPlayer() {
        return player;
    }

    public CIFItemInstance getItem() {
        return item;
    }

    public CIFBlockEvent.Action getAction() {
        return action;
    }

    public Location getLocation() {
        return location;
    }

    public static HandlerList getHandlerList() {
        return handlerList;
    }

    @Override
    public HandlerList getHandlers() {
        return handlerList;
    }
}
